package com.ruoyi.web.ydz.mapper;


import com.ruoyi.web.ydz.domain.Reply;

import java.util.HashMap;
import java.util.List;

/**
 * 帖子回复Mapper接口
 * 
 * @author ruoyi
 * @date 2024-10-29
 */
public interface ReplyMapper 
{
    /**
     * 查询帖子回复
     * 
     * @param id 帖子回复主键
     * @return 帖子回复
     */
    public Reply selectReplyById(Long id);

    /**
     * 查询帖子回复列表
     * 
     * @param reply 帖子回复
     * @return 帖子回复集合
     */
    public List<Reply> selectReplyList(Reply reply);

    /**
     * 新增帖子回复
     * 
     * @param reply 帖子回复
     * @return 结果
     */
    public int insertReply(Reply reply);

    /**
     * 修改帖子回复
     * 
     * @param reply 帖子回复
     * @return 结果
     */
    public int updateReply(Reply reply);

    /**
     * 删除帖子回复
     * 
     * @param id 帖子回复主键
     * @return 结果
     */
    public int deleteReplyById(Long id);

    /**
     * 批量删除帖子回复
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteReplyByIds(Long[] ids);

    public Long getReplyCount(Long invitationId);

    /*根据帖子ID获取下属评论count*/
    public List<Reply> getAnyReply(Long invitationId);

    /*根据评论ID获取下属评论count*/
    public Long getReplyCountByReplyId(HashMap<String,Object> paraMap);

    public List<Reply> getForUsReply(Long userId);

    public List<Reply> getToOtherReply(Long userId);
}
